<?php



class Component_Validator_Passwordconfirm extends Zend_Validate_Abstract{



    const NOT_MATCH = 'notMatch';



    protected $_messageTemplates = array(
        self::NOT_MATCH => 'Пароль не совпадает',

    );


    public function  isValid($value,$content = null) {
        
        
    $value = (string)$value;
   
        if(is_array($content)){
            if(isset($content['password']) && $value == $content['password']){
                return true;
            }
        }elseif(is_string($content) && ($value == $content)){
            return true;
        }
            $this->_error(self::NOT_MATCH);
            return false;
    }



}